home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-10-19 | 1.6 KB | 65 lines | [TEXT/KAHL] |
-
-
- // Prototypes
- void CreateMySplashWindow( void );
-
- // Macros & stuff
- #define SPLASH_WINDOW 128
-
- /****************************************************************************
-
- This is a simple little procedure for displaying my stupid looking
- splash screen. It's used when a user selects "about" in the apple
- menu.
-
- *****************************************************************************/
- void CreateMySplashWindow( void )
- {
- DialogPtr splash_dialog;
- GrafPtr oldPort;
- short itemHit, iType;
- Handle iHandle;
- Rect iRect;
- PicHandle thePicture;
-
- // Get my splash dialog
- splash_dialog = GetNewDialog( SPLASH_WINDOW, 0, (WindowPtr)-1 );
- GetPort( &oldPort );
- SetPort( splash_dialog );
-
- // simple procedure to frame the 'ok' button
- GetDItem( splash_dialog, 1, &iType, &iHandle, &iRect );
- PenSize( 3, 3 );
- InsetRect( &iRect, -4, -4 );
- FrameRoundRect( &iRect, 16, 16 );
-
- // Are we color?
- if( GetDepth( splash_dialog ) > 4 ) {
- thePicture = GetPicture( 129 );
- } else {
- thePicture = GetPicture( 128 );
- }
-
- // Draw the correct picture
- SetRect( &iRect, 7, 7, 303, 148 );
- DrawPicture( thePicture, &iRect );
-
- // Set our font stuff up and draw the version string
- TextFont( 9 );
- TextSize( 9 );
- MoveTo( 13, 195 );
- DrawString( "\pVersion 2.0.2 10/95" ); // my version string
-
- // Do a modal dialog and wait for user interaction.
- do {
- ModalDialog( 0, &itemHit );
- switch( itemHit ) {
- case ok:
- break;
- }
- } while( itemHit != 1 );
-
- // The user hit ok. So get rif of the dialog and set things back to abby-normal.
- DisposeDialog( splash_dialog );
- SetPort( oldPort );
- }